****************************************
* Table E1: Hurricane Distance and Monthly Google Searches 2004-2015
******************************************

preserve
import delim "$input/gtrends_monthly_regressiondata.csv", clear

*flood 

qui reg flood new2min google yahoo bing i.stateid##i.monthid i.year , cl(stateid)
regsave new2min using "$temp/fig6data.dta", table(floodcoef, order(regvars)) replace tstat pval ci
outreg2 using "$output/tabe1.doc", replace  dec(3)

*life

qui reg life new2min google yahoo bing i.stateid##i.monthid i.year , cl(stateid)
regsave new2min using "$temp/fig6data.dta", table(lifecoef, order(regvars)) append tstat pval ci
outreg2 using "$output/tabe1.doc", append  dec(3)

*car

qui reg car new2min google yahoo bing i.stateid##i.monthid i.year , cl(stateid)
regsave new2min using "$temp/fig6data.dta", table(carcoef, order(regvars)) append tstat pval ci
outreg2 using "$output/tabe1.doc", append  dec(3)

*home

qui reg home new2min google yahoo bing i.stateid##i.monthid i.year , cl(stateid)
regsave new2min using "$temp/fig6data.dta", table(homecoef, order(regvars)) append tstat pval ci
outreg2 using "$output/tabe1.doc", append  dec(3)

*health

qui reg health new2min google yahoo bing i.stateid##i.monthid i.year , cl(stateid)
regsave new2min using "$temp/fig6data.dta", table(healthcoef, order(regvars)) append tstat pval ci
outreg2 using "$output/tabe1.doc", dec(3) append tex  


*fema

qui reg fema new2min google yahoo bing i.stateid##i.monthid i.year , cl(stateid)
regsave new2min using "$temp/fige1data", table(femacoef, order(regvars)) replace ci

restore

